package com.qianfeng.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "sys_module", schema = "wfx")
public class SysModule {
    private String moduleId;
    private String moduleCode;
    private String moduleName;
    private String linkUrl;
    private Integer moduleOrder;
    private String parentModule;
    private String moduleDesc;
    private String expanded;
    private String leaf;

    @Id
    @Column(name = "module_id")
    public String getModuleId() {
        return moduleId;
    }

    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }

    @Basic
    @Column(name = "module_code")
    public String getModuleCode() {
        return moduleCode;
    }

    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }

    @Basic
    @Column(name = "module_name")
    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    @Basic
    @Column(name = "link_url")
    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    @Basic
    @Column(name = "module_order")
    public Integer getModuleOrder() {
        return moduleOrder;
    }

    public void setModuleOrder(Integer moduleOrder) {
        this.moduleOrder = moduleOrder;
    }

    @Basic
    @Column(name = "parent_module")
    public String getParentModule() {
        return parentModule;
    }

    public void setParentModule(String parentModule) {
        this.parentModule = parentModule;
    }

    @Basic
    @Column(name = "module_desc")
    public String getModuleDesc() {
        return moduleDesc;
    }

    public void setModuleDesc(String moduleDesc) {
        this.moduleDesc = moduleDesc;
    }

    @Basic
    @Column(name = "expanded")
    public String getExpanded() {
        return expanded;
    }

    public void setExpanded(String expanded) {
        this.expanded = expanded;
    }

    @Basic
    @Column(name = "leaf")
    public String getLeaf() {
        return leaf;
    }

    public void setLeaf(String leaf) {
        this.leaf = leaf;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysModule sysModule = (SysModule) o;
        return Objects.equals(moduleId, sysModule.moduleId) &&
                Objects.equals(moduleCode, sysModule.moduleCode) &&
                Objects.equals(moduleName, sysModule.moduleName) &&
                Objects.equals(linkUrl, sysModule.linkUrl) &&
                Objects.equals(moduleOrder, sysModule.moduleOrder) &&
                Objects.equals(parentModule, sysModule.parentModule) &&
                Objects.equals(moduleDesc, sysModule.moduleDesc) &&
                Objects.equals(expanded, sysModule.expanded) &&
                Objects.equals(leaf, sysModule.leaf);
    }

    @Override
    public int hashCode() {
        return Objects.hash(moduleId, moduleCode, moduleName, linkUrl, moduleOrder, parentModule, moduleDesc, expanded, leaf);
    }
}
